<?php if(!IS_AJAX){?>
<include file="Public:header" />
<style>
.expend-calendar{padding-left: 85px;padding-right: 10px;position: relative;}
.widget-calendar{width: 85px;padding: 0 10px;position: absolute;}
.widget-calendar .date{width: 60px;height: 60px;border-radius: 4px;box-shadow: 0 1px 4px rgba(0,0,0,0.14); margin:auto;}
.widget-calendar .month{background: linear-gradient(to bottom,#abf6da ,#78dcb6);color: #fff;}
.widget-calendar .day{ color:#999;}
.panel-log .social-links{ margin-top:5px; background: white;position: absolute;right: 10px; top:-10px; padding-right:5px;}
.panel-log .DataListItem:not(:last-child){ border-bottom:1px solid #ddd; padding-bottom:5px;}
.panel-log .DataListItem:not(:first-child){ margin-top:20px;}
.panel-log .title{ white-space:nowrap; padding-right:75px; overflow:hidden; text-overflow:ellipsis; margin-bottom:15px;}
.panel-log .content{ padding-top:10px; height:48px; overflow:hidden; border-top:1px solid #f3f3f3;}

#infocategorybox td{padding:5px;}
.btn-info{ margin-bottom:5px;}
.newtab{margin: 0!important;background: #fff!important;}
.newtab li:first-child{margin-left: 35px;}
.newtab li{height: 50px;margin-left:20px;margin-left:20px;}
.newtab li.active{border-bottom: 3px solid #FC923F;}
</style>
<div class="row">
    <div class="col-sm-7 col-md-8 col-lg-9">
        <section class="panel">
            <header class="panel-heading custom-tab" style="padding:0">
                <ul class="nav nav-tabs newtab">
                    <li class="active">
                        <a href="#about-2" data-toggle="tab" style="line-height: 47px!important;padding:0px!important;">
                            <i class="fa fa-user"></i>
                            全部
                        </a>
                    </li>
                    <li class="">
                        <a href="#contact-2" data-toggle="tab" style="line-height: 47px!important;padding:0px!important;">
                            <i class="fa fa-envelope-o"></i>
                            我的
                        </a>
                    </li>
                </ul>
            </header>
        </section>
        <div class="panel" style="background: none;">
            <div class="" id="ajaxlistbox">
                    <?php }?>
                    <?php if(IS_AJAX){?>
                    <!-- 数据主体 -->
                    <volist name="list" id="vo">
                        <div class="panel-body panel-log" style="background:#fff;margin-bottom:15px">
                            <div class="DataListItem DataListItembg row widget-info-one"  id="ajaxlistbox-{$vo.id}">
                                <div class="pull-left">
                                    <img src="{$vo.headimg}" alt="" style="width:45px;margin: 0 15px;">
                                </div>
                                <div class="pull-left">
                                    <p style="font-size: 14px;font-weight: bolder;">{$vo.membername}</p>
                                    <p style="font-size: 13px">{$vo.datetime|date='Y年m月d日 H:i',###} - {$vo.memberpositionname}</p>
                                    <span class="subtitle">
                                        {$vo.content}
                                    </span>
                                </div>
                                <!--<div class="BatchOperation BatchOperationBtn">-->
                                    <!--<input class="checkbox" type="checkbox" name="id[]" value="{$vo.id}">-->
                                    <!--<i class="fa icon-check"></i>-->
                                    <!--<div class="fabg">-->
                                    <!--</div>-->
                                <!--</div>-->
                                <!--<div class="widget-calendar text-center">-->
                                    <!--<div class="date">-->
                                        <!--<div class="month">-->
                                            <!--{:date('m',$vo['datetime'])}月-->
                                        <!--</div>-->
                                        <!--<h4 class="day">-->
                                            <!--{:date('d',$vo['datetime'])}-->
                                        <!--</h4>-->
                                    <!--</div>-->
                                    <!--<h6>周{:date('w',$vo['datetime'])}</h6>-->
                                <!--</div>-->
                                <!--<div class=" expend-calendar">-->
                                    <!--<div class="widget-content padded">-->
                                        <!--<h5>-->
                                            <!--<div class="title"><b>{$vo.title}</b></div> -->
                                            <!--<ul class="optionBtnBox social-links pull-right" style="list-style: none">-->
                                                <!--<li>-->
                                                    <!--<?php if($vo['share']=='0'){?>-->
                                                    <!--<a title="共享日志" data-placement="top" data-toggle="tooltip" class="tooltips OptionBtn"  href="javascript:void(0);" rel="<?php echo U('share', array('id' => $vo['id'],'share'=>'1')); ?>" data-original-title="共享日志" <eq name="key" value="0">data-position="top" data-intro="分享日志，分享后日志变成公开，在我的空间里可以查看、评论和点赞"</eq>>-->
                                                        <!--<i class="fa icon-share-square-o"></i>-->
                                                    <!--</a>-->
                                                    <!--<?php } ?>-->
                                                    <!--<if condition="getAccessMenu($accessList, 'Intesys', 'Info_log', 'update')">-->
                                                        <!--<a title="修改日志" data-placement="top" data-toggle="tooltip" class="tooltips OptionBtn" width="650" href="javascript:void(0);" rel="{:U('edit', array('id' => $vo['id']))}" data-original-title="修改日志" <eq name="key" value="0">data-position="top" data-intro="编辑个人日志"</eq>>-->
                                                            <!--<i class="fa icon-edit"></i>-->
                                                        <!--</a>-->
                                                    <!--</if>-->
                                                    <!--<if condition="getAccessMenu($accessList, 'Intesys', 'Info_log', 'delete')">-->
                                                        <!--<a title="删除" data-placement="top" data-toggle="tooltip" class="tooltips deleteBtn" href="javascript:void(0);" rel="{:U('delete', array('id' => $vo['id']))}" data-id="{$vo.id}" data-original-title="删除" <eq name="key" value="0">data-position="top" data-intro="删除个人日志"</eq>>-->
                                                            <!--<i class="fa icon-trash-o"></i>-->
                                                        <!--</a>-->
                                                    <!--</if>-->
                                                <!--</li>-->
                                            <!--</ul>-->
                                        <!--</h5>-->
                                        <!--<p class="content">内容：{$vo.content}</p>-->
                                    <!--</div>-->
                                <!--</div>-->
                            </div>
                            <!-- 数据主体结束 -->
                            </div>
                    </volist>	
                    <?php }?>
                    <?php if(!IS_AJAX){?>
            <div class="PagesBox" id="ajaxlistboxpages">
            </div>
            </div>
        </div>
    </div>
    <div class="col-sm-5 col-md-4 col-lg-3">
        <div class="affixelement">
            <div class="states-info">
                <div class="panel green-bg" id="ajaxlistboxaddbtn" title="发布日志" rel="<?php echo(U('add')); ?>" width="650" style="cursor:pointer">
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-xs-3" style="text-align:right">
                                <i class="fa icon-file-text"></i>
                            </div>
                            <div class="col-xs-9">
                                <h4>发布日志</h4>
                                <span class="state-title"> 发布最新日志或动态 </span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="panel">
                <!--<header class="panel-heading"> 日志搜索-->
                    <!--<a href="##" id="ajaxlistboxbob" class="pull-right">-->
                        <!--批量操作-->
                    <!--</a>-->
                <!--</header>-->
                <div class="panel-body">
                    <!--<div class="form-group" id="ajaxlistboxboc" style="display:none;">-->
                        <!--<a href="##" class="btn btn-info" id="ajaxlistboxsa">-->
                            <!--全选-->
                        <!--</a>-->
                        <!--<a href="##" class="btn btn-info" id="ajaxlistboxca">-->
                            <!--全不选-->
                        <!--</a>-->
                        <!--<a href="##" class="btn btn-info" id="ajaxlistboxsar">-->
                            <!--反选-->
                        <!--</a>-->
                        <!--<a rel="<?php echo U('delete') ?>" href="##" class="btn btn-danger bdeleteBtn">-->
                            <!--删除选中-->
                        <!--</a>-->
                    <!--</div>-->
                    <form action="<?php echo U('index');?>" id="ajaxlistboxform">
                        <div class="input-group">
                            <input type="text" name="keywords" class="form-control" placeholder="请输入标题或内容的关键字">
                            <span class="input-group-btn">
                            <button type="button" onClick="$('#ajaxlistboxform').submit();" class="btn btn-default"><i class="fa icon-search" style="font-size:16px"></i></button>
                            </span>
                        </div>
                        <div id="infocategoryvar">
                        </div>
                    </form>
                </div>
            </div>
            <div class="panel">
                <div class="panel-body">
                    <div class="calendar-block ">
                        <div class="cal1">

                        </div>
                    </div>

                </div>
            </div>
            <div class="panel">
                <header class="panel-heading"> 日志分类 <span class="pull-right">
                    <a href="javascript:void(0);" id="infocategoryboxaddbtn" rel="<?php echo U('Infocategory/add');?>" width="300" title="新增日志分类">
                        增加分类
                    </a>
                    </span>
                </header>
                <div class="panel-body">
                    <!-- 日志分类 -->
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tbody id="infocategorybox">
                        </tbody>
                    </table>
                    <div id="infocategoryboxpages">
                    </div>
                    <form action="<?php echo U('Infocategory/index');?>" id="infocategoryboxform">
                    </form>
                    <!-- -->
                </div>
            </div>
        </div>
    </div>
</div>
<include file="Public:script" />
<script>
$('#infocategorybox').ajaxlist({nodata:'<div style="text-align:center;">暂无分类</div>', success:function(obj){
	obj.find('.titletext').each(function(index, element){
		$(this).removeClass('titletext');
		$(this).click(function(e) {
            var html = '<div id="member_pos_id'+$(this).attr('data-id')+'" class="alert alert-info" style="display:inline-block; margin-bottom:2px; margin-right:2px; padding:5px;"><button type="button" class="close close-sm" onclick="" data-dismiss="alert"> <i class="fa icon-times"></i> </button><strong><input type="hidden" value="'+$(this).attr('data-id')+'" name="infocategory_id[]" class="NodeId" />'+$(this).html()+'</strong> </div>';
          $('#member_pos_id'+$(this).attr('data-id')).remove();
          $(html).appendTo('#infocategoryvar').find('.close').each(function(){
              $(this).click(function(e) {
                  setTimeout(function(){ $('#ajaxlistboxform').submit()}, 200);
              });
          });
          $('#ajaxlistboxform').submit();
        });
	});
}});
    $('#ajaxlistbox').ajaxlist({success:function(){
		$('.tooltips').tooltip();
	}});
$('.day').click(function(){
    alert(1);
    });
$('.cal1').clndr({
    clickEvents: {
        click: function(target) {
//            console.log(target);
            if( !$(target.element).hasClass('inactive') ) {
                $('.day').removeClass('today');
                $(target.element).addClass('today');
                console.log($(target.element).children('div').text());
            } else {        console.log('日期超出范围！');
            }
        }
    }
})
</script>
</body></html><?php }?>